var axios =require("axios");

var Flow={
       GetNodes(flowId){

	       return axios.get('/services/Flow/GetNodes?flowId='+flowId)
           .then(function (data) {
               return data.data;
           })
      .    catch(function (err) { console.warn('Error in FindProjects', err) })
       },
	
	RunFlow(flowId){

	       var params = new URLSearchParams();
           params.append('flowId',flowId);
	       return axios.post("/services/Flow/RunFlow",params)
           .then(function (data) {
               return data.data;
           })
      .    catch(function (err) { console.warn('Error in RunFlow', err) })
       }
};

export {
	Flow
}